import Vue,{VNode,CreateElement} from 'vue';

export interface RenderFunction{
	(h:CreateElement):VNode
}
/**
 * 所有需要渲染的函数
 */
const renders:Array<RenderFunction>=[];
/**
 * 根容器
 */
const RootContainer=Vue.extend({
	name:'RootContainer',
	render(h):VNode{
		return h('div',{
			staticClass:'lexmis-RootContainer'
		},renders.map((render) => render.call(this,h)));
	}
});
const rootContainerVue=new Vue(RootContainer);
const element=document.createElement('div');
document.body.appendChild(element);
rootContainerVue.$mount(element);

export {
	rootContainerVue,
	renders,
};
